// util/auth.js
import store from "@/store";
export default {
  bind(el, binding, vnode) {
    let auths = store.state.loginInfo.roleBtns;  // 后台返回的按钮权限列表
    let hasAuth = auths.includes(binding.value);
    if (hasAuth) {
      delete el.style.display;
    } else {
      el.style.display = "none";
    }
  }
}